package com.lmx.project.service;

import com.lmx.project.model.dto.category.CategoryRequestUpdate;
import com.lmx.project.model.entity.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
* @author Lenovo
* @description 针对表【category(类别表)】的数据库操作Service
* @createDate 2023-04-07 22:36:34
*/
public interface CategoryService extends IService<Category> {

    @Transactional
        // 如果抛出异常回滚数据
    boolean saveUserByExcle(MultipartFile contact) throws IOException;

    /**
     * 更新类别名称
     * @param categoryRequestUpdate
     * @return
     */
    Long updateCategory(CategoryRequestUpdate categoryRequestUpdate);
}
